import * as constant from "./constant"

const defaultState = {
    userInfo: {},
    question: []
}

export default (state = defaultState, action) => {
    switch (action.type) {
        case constant.GET_USER:
            return {
                ...state,
                userInfo: action.info
            }
        case constant.GET_QUESTION:
            return {
                ...state,
                question: action.question
            }
        default:
            return state
    }
}